window.GetUrlParameter = function(name){
	let url = location.search;
	if(!url){
		return null;
	}
	if(url.startsWith("?")){
		if(url.length === 1){
			return null;
		}
		url = url.substring(1);
	}
	let tokens = url.split("&");
	for(let token of tokens){
		let kv = token.split("=");
		if(kv.length < 2){
			continue;
		}
		let key = kv[0];
		let value = kv[1];
		if(name === key){
			return value;
		}
	}
	return null;
};